//
//  Http.h
//  thefirst
//
//  Created by Apple on 16/5/17.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>

@interface Http : NSObject

typedef void(^CLResponseSuccess)(id response);
typedef void(^CLResponseFail)(NSError *error);


typedef void(^CLDownLoadCompleteHandler)(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error);

/**
 *  get请求
 *
 *  @param url     接口地址
 *  @param params  参数
 *  @param success 成功的block
 *  @param fail    失败的block
 */


+ (void)getWithUrl:(NSString *)url
                          params:(NSDictionary *)params
                         success:(CLResponseSuccess)success
                            fail:(CLResponseFail)fail;


+ (void)postWithUrl:(NSString *)url
                          params:(NSDictionary *)params
                         success:(CLResponseSuccess)success
                             fail:(CLResponseFail)fail;
@end
